<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="/static/jQuery-3.3.1.js"></script>
    <title>jsons</title>
</head>
<body>

<button class="btn"> 提交</button>

</body>

<script>
    $(".btn").on("click", function () {
        get_data = {"name": "xiong", "age": 100}
        get_data = JSON.stringify(get_data)
        $.ajax({
            url: "{% url 'jsons' %}",
            type: "post",
            contentType: "application/json",
            {#dataType: "json",#}
            data: get_data,
            success: function (data) {
                console.log(data, typeof data)
                console.log(JSON.parse(data))
            }
        })
    })
</script>

</html>